Skip to content

Conversation

@antvaset
Copy link
Contributor

@antvaset antvaset commented Jan 9, 2026

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Formatting check succeeded!

@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

❌ Patch coverage is 97.39130% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.88%. Comparing base (2205590) to head (8313e2e).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
.../engine/execution/trace/ExpressionDefTraceFrame.kt 94.28% 0 Missing and 2 partials ⚠️
...tlin/org/opencds/cqf/cql/engine/execution/State.kt 95.45% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1663      +/-   ##
============================================
+ Coverage     65.82%   65.88%   +0.06%     
  Complexity     1645     1645              
============================================
  Files           474      477       +3     
  Lines         27454    27496      +42     
  Branches       5463     5467       +4     
============================================
+ Hits          18071    18117      +46     
+ Misses         7085     7083       -2     
+ Partials       2298     2296       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link

@antvaset antvaset changed the title Evaluation tracing WIP Evaluation tracing Jan 10, 2026
@antvaset antvaset marked this pull request as ready for review January 10, 2026 06:14
@sonarqubecloud
Copy link

cqlEngine: CqlEngine,
expression: String,
initialContext: Pair<String, Any>?,
initialContext: Pair<String, Any?>?,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: This looks incorrect to me. What are the cases where you might have a context specified and set as null?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on whether we want to allow something like "Unfiltered" to null for the context-value pair. Doing so is equivalent to not providing the pair at all in which case the State.contextValues map won't have the "Unfiltered" key and the lookup will return null anyway.

context.getCurrentLibrary()?.identifier,
expression,
)
if (exception.backtrace == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: What stops us from building the exception with the correct backtrace attached from the get-go?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is to be attached always at the very beginning, we'll need to make the engine state or State.stack (the activation frame stack) available everywhere a CqlException or its subclass (InvalidCast, TerminologyProviderException, DataProviderException, etc.) is instantiated. TerminologyProviderException and DataProviderException are part of public provider APIs so they aren't concerned with the engine state. An alternative would be to extend or create a new CqlException when it enters the engine scope and that's what it effectively does currently (and all in one place).

"""
.trimIndent(),
backtrace.toString(),
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Nice cleanup / simplification!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@antvaset antvaset merged commit fc46135 into master Jan 13, 2026
9 checks passed
@antvaset antvaset deleted the evaluation-tracing branch January 13, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants